<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:h="http://java.sun.com/jsf/html">

<body>
	<ui:composition template="../template.xhtml">

		<ui:define name="right">

		</ui:define>

		<ui:define name="center">
			<h2>#{bundle.ListSeries}</h2>

			<h:form id="form">
		  
				<p:dataTable var="exp" value="#{listGeoSeriesController.lazyModel}"
					paginator="true" rows="10" lazy="true"
					paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
					rowsPerPageTemplate="5,10,15" selectionMode="single"
					selection="#{listGeoSeriesController.selected}">

					<p:ajax event="rowSelect"
						listener="#{listGeoSeriesController.onRowSelect}"
						update=":form:display" oncomplete="expDialog.show()" />

					<p:column headerText="Name" sortBy="#{exp.seriesIid}"
						filterBy="#{exp.seriesIid}">
						<h:outputText value="#{exp.seriesIid}" />
					</p:column>

					<p:column headerText="Title" sortBy="#{exp.title}"
						filterBy="#{exp.title}">
						<h:outputText value="#{exp.title}" />
					</p:column>

					<p:column headerText="Type" sortBy="#{exp.type}"
						filterBy="#{exp.type}">
						<h:outputText value="#{exp.type}" />
					</p:column>

				</p:dataTable>
				

				<p:dialog header="Experiment Detail" widgetVar="expDialog"
					resizable="false" showEffect="explode" hideEffect="explode">

					<h:panelGrid id="display" columns="2" cellpadding="4">

						<h:outputText value="Name" />
						<h:outputText
							value="#{listGeoSeriesController.selected.seriesIid}"
							style="font-weight:bold" />

						<h:outputText value="Title" />
						<h:outputText value="#{listGeoSeriesController.selected.title}"
							style="font-weight:bold" />

						<h:outputText value="Summary" />
						<h:outputText value="#{listGeoSeriesController.selected.summary}"
							style="font-weight:bold" />

						<h:outputText value="Overall Design" />
						<h:outputText
							value="#{listGeoSeriesController.selected.overallDesign}"
							style="font-weight:bold" />
					</h:panelGrid>
				</p:dialog>

			</h:form>

		</ui:define>

	</ui:composition>
</body>
</html>
